<?php 
include("../sesiune.php");
$id = $_GET['id'];
$query="SELECT * FROM produse WHERE ID=$id";
$showProd = mysql_query($query,getConnection()) or die (mysql_error());
$nr = mysql_num_rows($showProd);
if($nr>0)
{
	$displayProd= mysql_fetch_array($showProd); 
} else {
	die('nu exista produsul');
}
?>
<form action="update.php" method="post">
<table style="border: 1px solid black">
	<tr>
		<td>Numele produsului</td>
		<td><input type="text" name="numeProd" value ="<?php echo $displayProd['numeProd']?>"/></td>
	</tr>
	<tr>
		<td>Detalii</td>
		<td><textarea rows="10" cols="10" name="detalii"><?php echo $displayProd['detalii']?></textarea></td>
	</tr>
	<tr>
		<td>Pret</td>
		<td><input type="text" name="pret" value="<?php echo $displayProd['pret']?>"/></td>
	</tr>
	<tr>
		<td>Upload</td>
		<td><input type="file" name="upload"/></td>
	</tr>
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td><input type="submit" value="Submit" /></td>
		<td><a href="editProd.php"><input type="button" value="Cancel"></a></td>
	</tr>
	<input type="hidden" name="edit" value="<?php echo $displayProd["ID"];?>"
</table>
</form>